﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Unity;

namespace WDA.Core
{
   /// <summary>
   /// Defines interface for service host factory.
   /// </summary>
   public interface IServiceHostFactory
   {
      /// <summary>
      /// Cretes new service host and makes it listen on provided URL.
      /// </summary>
      /// <param name="serviceName">Name of WDAB service.</param>
      /// <param name="serviceContract">CLR type of service contract.</param>
      /// <param name="serviceImplementation">CLR type of service implementation.</param>
      /// <param name="publishUrl">URL to publish service at.</param>
      /// <param name="localContainer">Unity container where servants live.</param>
      /// <returns>Object representing service host.</returns>
      IDisposable CreateServiceHost(string serviceName, Type serviceContract, Type serviceImplementation, Uri publishUrl, IUnityContainer localContainer);
      /// <summary>
      /// Creates new service host for service monitor and makes it listen on provided URL.
      /// </summary>
      /// <param name="monitorContract">CLR type of monitor contract.</param>
      /// <param name="monitorImplementation">CLR type of monitor implementation.</param>
      /// <param name="publishUrl">URL to publish service at.</param>
      /// <returns>Object representing monitor service host.</returns>
      IDisposable CreateMonitorHost(Type monitorContract, object monitorImplementation, Uri publishUrl);
   }
}
